<?php

use Phinx\Migration\AbstractMigration;

class AddEngineAndBatchColumnInStepTable extends AbstractMigration
{
    public function up()
    {
        $this->table("step")
            ->addColumn("engine", 'string', ['null' => false, 'limit' => 128, 'default' => "", 'comment' => '软件程序code'])
            ->addColumn("batch", 'char', ['null' => false, 'limit' => 128, 'default' => "", 'comment' => '软件后台执行程序code'])
            ->save();
    }

    public function down()
    {
        $this->table("step")
            ->removeColumn("engine")
            ->removeColumn("batch")
            ->save();
    }
}
